package com.qk.management.mapper;

import com.qk.entity.Activity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ActivityMapper {

    List<Activity> selectByPage(Integer channel, Integer type, Integer status);

    @Select("select * from activity where id = #{id}")
    Activity selectById(Integer id);

    void update(Activity activity);

    void add(Activity activity);

    @Delete("delete from activity where id = #{id}")
    void delete(Integer id);

    @Select("select * from activity where channel = #{type}")
    List<Activity> listByChannel(Integer type);
}
